From: Jeremy Bryant Date: Tue, 9 Apr 2024 21:54:39 +0000 (+0100) Subject: Remove old backport version of universal-argument--description X-Git-Tag: archive/raspbian/1%30.1+1-3+rpi1^2~14^2~18^2~983^2~10^2~1 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b3974a28f39f535fae7a4fae14255a34a52569e8;p=emacs.git Remove old backport version of universal-argument--description In preparation for the move to Emacs core, this is no longer needed. Furthermore, the backport was of emacs25 on 2015-12-04 so is unlikely to affect most current installations in the meantime. * which-key.el: Remove old backport of 2025-12-04. (which-key--full-prefix): Use built-in universal-argument--description. --- diff --git a/which-key.el b/which-key.el index 0e14c76df95..0d44a61020a 100644 --- a/which-key.el +++ b/which-key.el @@ -2194,32 +2194,13 @@ Actual lines: %s" (which-key--propertize (format "[%s paging/help]" key) 'face 'which-key-note-face)))) -(eval-and-compile - (if (fboundp 'universal-argument--description) - (defalias 'which-key--universal-argument--description - #'universal-argument--description) - (defun which-key--universal-argument--description () - ;; Backport of the definition of universal-argument--description in - ;; emacs25 on 2015-12-04 - (when prefix-arg - (concat "C-u" - (pcase prefix-arg - (`(-) " -") - (`(,(and (pred integerp) n)) - (let ((str "")) - (while (and (> n 4) (= (mod n 4) 0)) - (setq str (concat str " C-u")) - (setq n (/ n 4))) - (if (= n 4) str (format " %s" prefix-arg)))) - (_ (format " %s" prefix-arg)))))))) - (defun which-key--full-prefix (prefix-keys &optional -prefix-arg dont-prop-keys) "Return a description of the full key sequence up to now. Include prefix arguments." (let* ((left (eq which-key-show-prefix 'left)) (prefix-arg (if -prefix-arg -prefix-arg prefix-arg)) (str (concat - (which-key--universal-argument--description) + (universal-argument--description) (when prefix-arg " ") prefix-keys)) (dash (if (and (not (string= prefix-keys ""))